function isMobile(phone) {
	var phoneReg = /^1[3,4,5,7,8][0-9]{9}$/;
	if (!phoneReg.test(phone)) {
		return false;
	}
	return true;
}
function userOptgpbysem(nameBox, mobileBox, codeBtn, opType, tips) {
	if (typeof(tips) == "undefined") {
		tips = "您已操作成功！客服人员会电话联系您，请稍作等待！";
	}

	var mobile = $.trim($("[name='" + mobileBox + "']").val());


	if (mobile == null || mobile == "") {
		layer.tips("请填写手机号码", $("[name='" + mobileBox + "']"), {
			tips: [1, '#fcc000'],
			time: 3000
		});
		return;
	}
	if (!isMobile(mobile)) {
		layer.tips("请输入有效格式的手机号码！", $("[name='" + mobileBox + "']"), {
			tips: [1, '#fcc000'],
			time: 3000
		});
		return;
	}
	else {

        layer.msg('评测结果稍后发送给您！', {
            time: 0 //不自动关闭
            ,btn: ['查看更多','确定']
            ,yes: function(index){
               window.location.href='http://www.haogusheng.com'
            }
        });
	}
	// var loadi = layer.load(1, {
	// 	shade: [0.4, '#000']
	// });
	// var params = {
	// 	"LinkID": opType,
	// 	"Mobile": mobile,
	// 	"Reserve1": name
	// };


}


